package cn.longg.mapper;

import org.springframework.util.StringUtils;

public class UserMapperSqlProvider {

    public String selectAllByName(String name){
        StringBuilder sb = new StringBuilder();
        sb.append("select * from `user` ");
        if(!StringUtils.isEmpty(name)){
            sb.append("where real_name like concat('%',#{name},'%')");
        }
        System.out.println(sb.toString());
        return sb.toString();
    }
}
